#ifndef _ClIENT_H
#define _CLIENT_H

#include "mypkg.h"

//0-不打印  1-打印
#define LOG_LEVEL 1 
#define REC_BUF_LEN 4096
#define PRINT_CR 16


//mynet.c 数据发送
int client_init(char* ip, int port);
int client_sendAndRet(char* sendbuf,int len, pkg_t* retPkg, char* errmsg);
void* client_recv_task(void* arg);
void* client_heart_task(void* arg);
const char* client_loginname();
void client_start_heart(char* username);
void client_stop_heart();
//int client_sendAndRet2(spkg_ret_t* out, char* out_msg, char* sendbuf,int len, int times, int timeout);

#endif
